Skip to content

Conversation

@binghao-cai
Copy link
Contributor

@binghao-cai binghao-cai commented Oct 25, 2025

GM

Task

base: Graph, GraphSetTaskBase
gm: GMTask

key functions in graphset.base.py

  • Graph
    • from_data
  • GraphSetTaskBase
    • from_data
  • numpy completement of sinkhorn
  • numpy completement of hungarian

key functions in graphset.gm.py

  • gmtask.build_aff_mat()
  • inner_prod_aff_fn()
  • gaussian_aff_fn()
  • _aff_mat_from_node_edge_aff()
  • gmtask.evaluate()
  • gmtask.render()

Generator

graphset.base.py
class

  • GRAPH_TYPE
  • GRAPH_FEATURE_TYPE
  • GraphFeatureGenerator
  • GraphSetGeneratorBase
    • single graph generate methods
    • _isomorphic_graph_generate()
    • _induced_subgraph_generate()
    • _perturbed_graph_generate()

graphset.gm.py
the function _create_instance() construct gmtask from nx_graphs with aff_mat

Solver

To match the requestment of evaluation and test, hard solutions are added through hungarian(nummpy) affer the soft solutions are given by solvers.

  • classical solver for gm
  • sm
  • ipfp
  • rrwm
  • astar(torch completement)
  • neural solver for gm
  • ngm(torch completement)
  • gnn_astar(torch completement)

Wrapper

The internal structure of the .txt file
“ edge_index_for_graph1 src1 tgt1 src2 tgt2 $\cdots$"
“ edge_index_for_graph2 src1 tgt1 src2 tgt2 $\cdots$"
“ node_feature_for_graph1 feat1;feat2; $\cdots$"
“ node_feature_for_graph2 feat1;feat2; $\cdots$"
“ edge_feature_for_graph1 feat1;feat2; $\cdots$"
“ edge_feature_for_graph2 feat1;feat2; $\cdots$"
" association graph label1 label2 $\cdots$"
The above is in the same line and feat is joined by " "space

Testdata

Isomorphic
gm.task

  • gm_er_large_uniform_task.pkl
    30 nodes , 16-dim node-feat, 16-dim edge-feat
  • gm_er_small_uniform_task.pkl
    10 nodes , 36-dim node-feat, 36-dim edge-feat

gm.wrapper

  • gm_er_large_uniform_4ins
    30 nodes ,16-dim node-feat, 16-dim edge-feat
  • gm_er_small_uniform_4ins
    10 nodes ,36-dim node-feat, 36-dim edge-feat

GED

test_data

Isomorphic
ged.task

  • ged_er_uniform_4ins
    10 nodes, 36-dim node-feat, 36-dim edge-feat

@binghao-cai binghao-cai changed the title Task for GM problem GM problem Nov 12, 2025
@binghao-cai binghao-cai changed the title GM problem GM&GED problem Dec 1, 2025
@heatingma heatingma merged commit f810f53 into Thinklab-SJTU:main Dec 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants